package com.bk.ouat.dao;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import com.bk.ouat.dto.CategoryDto;

@Repository
public class CategoryDao extends SqlSessionDaoSupport{

	public List<CategoryDto> list() {
		return (List<CategoryDto>)getSqlSession().selectList("categoryQuery.list");
	}

	public String getHeaderNameByCategoryId(int category_id) {
		return (String)getSqlSession().selectOne("categoryQuery.getHeaderNameByCategoryId", category_id);
	}

}
